package homework.day01;

import java.io.File;
import java.io.FileFilter;
import java.util.Scanner;

public class Test03 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输出关键字");
        String  str=scanner.next();
        File file=new File("./src/main/java/file");
        if (file.isDirectory()){
            File[] file1=file.listFiles();
            for (int i=0;i<file1.length;i++){
                String  ss=file1[i].getName();
                if (ss.contains(str)){
                    System.out.println(ss);
                }else {
                    System.out.println("没有");
                }
            }






        }
    }
}
